package org.itstack.filter;

import org.itstack.BaseOrderLogic;
import org.itstack.model.Order;
import java.time.LocalTime;

/**
 * 订单时间过滤器
 * 根据当前时间判断是否为工作时间
 */
public class OrderTimeFilter extends BaseOrderLogic {
    
    @Override
    public String matterValue(Order order) {
        // 根据当前时间判断是否为工作时间
        LocalTime now = LocalTime.now();
        if (now.isAfter(LocalTime.of(9, 0)) && now.isBefore(LocalTime.of(18, 0))) {
            return "WORK_TIME";
        } else {
            return "NON_WORK_TIME";
        }
    }
}
